package task5;

public class MyThreadPoolApp {

	private final static int THREADS_QUANTITY = 10;
	private final static int TASKS_QUANTITY = 20;

	public static void main(String[] args) {

		MyThreadPool mtp = new MyThreadPool(THREADS_QUANTITY);

		Thread[] tasks = new Thread[TASKS_QUANTITY];

		for (int i = 0; i < TASKS_QUANTITY; i++) {
			tasks[i] = new Thread(mtp.new MyTask(String.valueOf(i)));
		}

		for (int i = 0; i < TASKS_QUANTITY; i++) {
			tasks[i].start();
		}
	}
}